<script setup>
import jiaowuSub from '@/views/content/jiaowu/jiaowuSub.vue';//导入展示区域
import {ref} from 'vue';
const subName=ref('tongzhigonggao')//定义subName,便于切换
const changeSubName=(newSubName)=>{
  subName.value=newSubName;
};
</script>

<template>
<div class="menu">
    <router-link to="/contents/jiaowu/tongzhigonggao" @click="changeSubName('tongzhigonggao')">通知公告</router-link>
    <router-link to="/contents/jiaowu/jiaoxuedongtai" @click="changeSubName('jiaoxuedongtai')">教学动态</router-link>
  </div>
  <div class="content">
    <jiaowuSub :subName="subName" />
</div>
</template>


<style>
.menu {
  padding: 10px 12px;
  display: flex;
  width: -moz-max-content;
  width: max-content;
}

.menu a {
  display: block;
  height: var(--horizon-menu-height);
  line-height: var(--horizon-menu-height);
  color: #6e6e6e;
  text-decoration: none;
  font-size: 13px;
  background: white;
  border-radius: 5px;
  padding: 4px 10px;
  margin: 0 4px;
  box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.1);
}

.menu .router-link-active {
  font-weight: bold;
  background: #42b983;
  color: #ffffff;
}
</style>